package com.huqing.icu.rentuser.controller;

import com.huqing.icu.base.BaseController;
import com.huqing.icu.rentuser.req.UserNumPanelQueryReq;
import com.huqing.icu.rentuser.service.IUserNumPanelService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 用户数量面板接口
 * @Author huqing
 * @Date 2025/9/6 14:11
 **/
@RestController
@RequestMapping("/admin/user_num_panel")
@Tag(name = "用户接口")
public class UserNumPanelController extends BaseController {

    @Autowired
    private IUserNumPanelService iUserNumPanelService;

    @Operation(summary = "查询列表")
    @PostMapping("/query_list")
    public String addComment(@RequestBody UserNumPanelQueryReq queryReq, HttpServletRequest request) {
        Long userId = checkAndGetUserId(request);
        return jsonSuccessForNull(iUserNumPanelService.queryList(queryReq));
    }
}
